<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
 */

namespace App\Controller;

use Hyperf\HttpServer\Annotation\Middleware;
use Hyperf\HttpServer\Annotation\Middlewares;
use App\Middleware\UserActMiddleware;
use App\Middleware\JTAuthMiddleware;
use App\Service\Moment\MomentCommentDelService;
use App\Service\Moment\MomentCommentLikeService;
use App\Service\Moment\MomentCommentListService;
use App\Service\Moment\MomentCommentService;
use App\Service\Moment\MomentDelService;
use App\Service\Moment\MomentDetailService;
use App\Service\Moment\MomentLikeService;
use App\Service\Moment\MomentListService;
use App\Service\Moment\MomentPublishService;
use App\Service\Moment\UserMomentListService;
use App\Service\Moment\v1_1_4\ShareAvatarMomentService;
use App\Service\Moment\v1_1_8\MomentLikeListService;
use App\Service\Moment\v1_1_8\MomentMsgListService;
use App\Service\Moment\v1_1_8\MomentNewMsgService;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;

/**
 * @Controller(prefix="moment")
 */
class MomentController extends AbstractController
{
    /**
     * 动态列表
     * @RequestMapping(path="list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function list(MomentListService $service)
    {
        return $service->response();
    }

    /**
     * 用户的动态列表
     * @RequestMapping(path="user_list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function user_list(UserMomentListService $service)
    {
        return $service->response();
    }

    /**
     * 动态列表
     * @RequestMapping(path="detail", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function detail(MomentDetailService $service)
    {
        return $service->response();
    }

    /**
     * 动态发布
     * @RequestMapping(path="publish", methods="post")
     * @Middlewares({
     *     @Middleware(JTAuthMiddleware::class),
     *     @Middleware(UserActMiddleware::class)
     * })
     */
    public function publish(MomentPublishService $service)
    {
        return $service->response();
    }

    /**
     * 动态点赞
     * @RequestMapping(path="like", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function like(MomentLikeService $service)
    {
        return $service->response();
    }

    /**
     * 动态删除
     * @RequestMapping(path="del", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function del(MomentDelService $service)
    {
        return $service->response();
    }

    /**
     * 留言
     * @RequestMapping(path="comment", methods="post")
     * @Middlewares({
     *     @Middleware(JTAuthMiddleware::class),
     *     @Middleware(UserActMiddleware::class)
     * })
     */
    public function comment(MomentCommentService $service)
    {
        return $service->response();
    }

    /**
     * 留言删除
     * @RequestMapping(path="comment/del", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function comment_del(MomentCommentDelService $service)
    {
        return $service->response();
    }

    /**
     * 留言列表
     * @RequestMapping(path="comment/list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function comment_list(MomentCommentListService $service)
    {
        return $service->response();
    }

    /**
     * 留言点赞
     * @RequestMapping(path="comment/like", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function comment_like(MomentCommentLikeService $service)
    {
        return $service->response();
    }

    /**
     * 真人头像认证动态
     * @RequestMapping(path="v1_1_4/share_avatar", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function share_avatar(ShareAvatarMomentService $service)
    {
        return $service->response();
    }

    /**
     * 动态新消息数量
     * @RequestMapping(path="v1_1_8/new_msg", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function new_msg(MomentNewMsgService $service)
    {
        return $service->response();
    }

    /**
     * 动态新消息列表
     * @RequestMapping(path="v1_1_8/msg_list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function msg_list(MomentMsgListService $service)
    {
        return $service->response();
    }

    /**
     * 动态点赞列表
     * @RequestMapping(path="v1_1_8/like_list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function like_list(MomentLikeListService $service)
    {
        return $service->response();
    }
}
